package com.hugeyurt;

import jakarta.servlet.MultipartConfigElement;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.DispatcherServlet;

@SpringBootApplication
@EnableCaching
@EnableScheduling //可以启动定时器

public class Demo0725Application {

    /*
    @Bean
    public ServletRegistrationBean dispatcherRegistration(DispatcherServlet dispatcherServlet,
                                                          MultipartConfigElement multipartConfigElement) {
        ServletRegistrationBean reg = new ServletRegistrationBean(dispatcherServlet);
        reg.getUrlMappings().clear();
        reg.addUrlMappings("*.do");
        reg.setMultipartConfig(multipartConfigElement);
        return reg;
    }
*/

    public static void main(String[] args) {
        SpringApplication.run(Demo0725Application.class, args);
    }

}
